import React from 'react'
import store  from '../../store/store'
import {getMovieAction} from '../../store/actions/movieActions'
export default function Movie() {
    const {count}=store.getState().count
    const {movieList} = store.getState().movie

    const getMoiveActions=()=>{
        store.dispatch(getMovieAction())
    }
  return (
    <div>
        <h1>我是Movie组件 我的值是{count}</h1>
        <button onClick={getMoiveActions}>获取电影数据</button>
        <ul>
            {
                movieList.map(item=>{
                    return<li key={item.tvId}>{item.albumName}</li>
                })
            }
        </ul>
    </div>
  )
}
